🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / app / src / main / java / com / geeksville / mesh / MeshUtilApplication.kt
Displaying Raw • Download
app/src/main/java/com/geeksville/mesh/MeshUtilApplication.kt 78274c792318331b11ab64cd28e58e829875b8c2 (78274c79) Text, 2.34 KB
T8b949e/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787com.geeksville.mesh
Tff7b72import T7ee787android.app.Application
Tff7b72import T7ee787dagger.hilt.EntryPoint
Tff7b72import T7ee787dagger.hilt.InstallIn
Tff7b72import T7ee787dagger.hilt.android.EntryPointAccessors
Tff7b72import T7ee787dagger.hilt.android.HiltAndroidApp
Tff7b72import T7ee787dagger.hilt.components.SingletonComponent
Tff7b72import T7ee787kotlinx.coroutines.CoroutineScope
Tff7b72import T7ee787kotlinx.coroutines.Dispatchers
Tff7b72import T7ee787kotlinx.coroutines.launch
Tff7b72import T7ee787org.meshtastic.core.database.DatabaseManager
Tff7b72import T7ee787org.meshtastic.core.prefs.mesh.MeshPrefs
Tff7b72import T7ee787timber.log.Timber
T8b949e/**
* The main application class for Meshtastic.
*
* This class is annotated with [HiltAndroidApp] to enable Hilt for dependency injection. It initializes core
* application components, including analytics and platform-specific helpers, and manages analytics consent based on
* user preferences.
*/
Tf0883e@HiltAndroidApp
Tff7b72class T56d364MeshUtilApplication Tb4b4b4: Te6edf3ApplicationTb4b4b4(Tb4b4b4) Tb4b4b4{
Tff7b72override Tff7b72fun Td2a8ffonCreateTb4b4b4(Tb4b4b4) Tb4b4b4{
Tff7b72superTb4b4b4.Te6edf3onCreateTb4b4b4(Tb4b4b4)
Te6edf3initializeMapsTb4b4b4(Tff7b72thisTb4b4b4)
T8b949e// Initialize DatabaseManager asynchronously with current device address so DAO consumers have an active DB
Tff7b72val Te6edf3entryPoint Tff7b72= Te6edf3EntryPointAccessorsTb4b4b4.Te6edf3fromApplicationTb4b4b4(Tff7b72thisTb4b4b4, Te6edf3AppEntryPointTff7b72::Te6edf3classTb4b4b4.Te6edf3javaTb4b4b4)
Te6edf3CoroutineScopeTb4b4b4(Te6edf3DispatchersTb4b4b4.Te6edf3DefaultTb4b4b4)Tb4b4b4.Te6edf3launch Tb4b4b4{
Te6edf3entryPointTb4b4b4.Te6edf3databaseManagerTb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3initTb4b4b4(Te6edf3entryPointTb4b4b4.Te6edf3meshPrefsTb4b4b4(Tb4b4b4)Tb4b4b4.Te6edf3deviceAddressTb4b4b4)
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tf0883e@EntryPoint
Tf0883e@InstallInTb4b4b4(Te6edf3SingletonComponentTff7b72::Te6edf3classTb4b4b4)
Tff7b72interface T56d364AppEntryPoint Tb4b4b4{
Tff7b72fun Td2a8ffdatabaseManagerTb4b4b4(Tb4b4b4)Tb4b4b4: Te6edf3DatabaseManager
Tff7b72fun Td2a8ffmeshPrefsTb4b4b4(Tb4b4b4)Tb4b4b4: Te6edf3MeshPrefs
Tb4b4b4}
Tff7b72fun Td2a8fflogAssertTb4b4b4(Te6edf3executeReliableWriteTb4b4b4: Tffa657BooleanTb4b4b4) Tb4b4b4{
Tff7b72if Tb4b4b4(Tff7b72!Te6edf3executeReliableWriteTb4b4b4) Tb4b4b4{
Tff7b72val Te6edf3ex Tff7b72= Te6edf3AssertionErrorTb4b4b4(Ta5d6ff"Ta5d6ffAssertion failedTa5d6ff"Tb4b4b4)
Te6edf3TimberTb4b4b4.Te6edf3eTb4b4b4(Te6edf3exTb4b4b4)
Tff7b72throw Te6edf3ex
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s